package Exercise;

public class EX01_Q21 {

	
	public static void main(String[] args) {
		
		
		double benefit = 7000;
		boolean married = true, unmarried = false;
		double tax = benefit * (float)0.1f;
		
		tax = benefit * (float)0.1f;
		
		if(benefit<3000 && married == false )
			
		 System.out.println("미혼,연봉 3천 이하" + tax + "만원의 세금이 부과됩니다.");
		 
		else if(benefit>3000 && married == false){
			System.out.println("미혼,연봉 3천이상"+ tax + "만원의 세금이 부과됩니다.");
		 }
		else if(benefit<6000 && married == true){
			System.out.println("기혼,연봉 6천이하" + tax + "만원의 세금이 부과 됩니다.");
		}
		else if(benefit>6000 && married == true){
			System.out.println("기혼,연봉 6천이하" + tax + "만원의 세금이 부과됩니다.");
		}

		//문제해결
		
		int salary = 17500;
		boolean isMarried = false;
		float taxx = 0.0F;
		
		if(isMarried == true ){                   //기혼인 경우
			if(salary<6000) taxx = salary * 0.1F;
			else if(salary>=6000) taxx = salary * 0.25F;
		}else if(isMarried == false){             //미혼인 경우
			if(salary<3000) taxx = salary * 0.1F;
			else if(salary>=3000) taxx = salary * 0.25F;
			
			System.out.println(isMarried);
			System.out.println(salary);
		}
		
		
		
		
		
		
		
	}

}
